import { CDBuyTimes } from "../excel/CDBuyTimes";


/**
 * 扩展-购买次数限制
 */
export abstract class CEBuyTimes {


    /**初始化 */
    public static init(): void {
    }


    /**
     * 道具刷新消耗值
     * @param times 
     * @returns < 0-不可刷
     */
    public static getShopRefreshCostNum(times: number): number {
        let bc = CDBuyTimes.getData(times);
        if (!bc) {
            const vs = CDBuyTimes.datas.getValues();
            bc = vs[vs.length - 1];
        }

        if (!bc || bc.marketRefreshCost < 0) {
            return -1;
        }

        const v = bc.marketRefreshCost;
        return v;
    }



}